#ifndef GULLENGINE_H
#define GULLENGINE_H

#include "Singleton.h"
#include "GullConfiguration.h"

#include "SceneManager.h"
#include "ApplicationManager.h"
#include "GraphicsManager.h"
#include "InputManager.h"


/** \namespace gull
 * All classes and functions of the Gull engine belong to gull namespace
 */
namespace gull{
    
    /** \namespace core
     *Core namespace brings together all classes and fonctions 
     *that are implie in basics functionality of the engine(memory, math, graphics,...) 
     */
	namespace core{
		
		//class InputManager;
//		class ApplicationManager;
//		class GraphicsManager;
//		class SceneManager;
		
		
        enum GULL_ENGINE_STATES{
			kExitSuccess,
			kExitFailure
		};
		
        class GullEngine: public Singleton<GullEngine> 
		{
            friend class Singleton<GullEngine>;
			friend class GullApplication;
			friend class GUIAPI;
		public:
			
			unsigned int start();
			void mainLoop();
			void stop();
			void reshape(int w, int h);
			
		protected:
			static SceneManager* s_gullSceneManager;
			static ApplicationManager* s_gullApplicationManager;
			static GraphicsManager* s_gullGraphicsManager;
			static InputManager* s_gullInputManager;
			
			
		private:
			
			GullApplication* currenApplication;
			GullEngine();
			~GullEngine();
		};
		
		extern GullEngine* theGullEngine;
		extern ApplicationManager* theGullApplicationManager;
		extern GraphicsManager* theGullGraphicsManager;
		extern SceneManager* theGullSceneManager;
		extern InputManager* theGullInputManager;
	}
}

#endif